package com.myprojects.webresources.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * 该控制器用于路由页面
 */
//@CrossOrigin
@Controller
//@RestController//注意！使用@RestController注解会附带@ResponseBody注解导致返回字符串信息
//@RequestMapping(value = "/auth")//这是该类的映射路径
public class RoutingController {

    //路由 测试页面1
    @RequestMapping(value = "/test1")
    public String test1(){
        return "/page/test1";
    }

    //路由 主页面
    @RequestMapping(value = "/index")
    public String showIndex(){
        return "/page/index";
    }

    //路由 登录页面
    @RequestMapping(value = "/")
    public String showLogin1(){
        return "/page/login";
    }
    //路由 登录页面
    @RequestMapping(value = "/login")
    public String showLogin2(){
        return "/page/login";
    }

    //路由 注册页面
    @RequestMapping(value = "/register")
    public String showRegister(){
        return "/page/register";
    }

    //路由 用户角色管理页面
    @RequestMapping(value = "/user-permission/user-manage")
    public String userCURD(){
        return "/page/permission/user_with_role_list";
    }

    //路由 角色权限管理页面
    @RequestMapping(value = "/role-permission/role-manage")
    public String roleCURD(){
        return "/page/permission/role_with_resource_list";
    }
//
//    //路由 用户管理页面
//    @RequestMapping(value = "/userPermission/selectUser")
//    public String selectUser(){
//        return "/page/user/user_list";
//    }

    //路由 部门管理页面
    @RequestMapping(value = "/department-permission/department-manage")
    public String departmentCURD(){
        return "/page/department/department_list";
    }

    //路由 职位管理页面
    @RequestMapping(value = "/position-permission/position-manage")
    public String positionCURD(){
        return "/page/department/position_list";
    }

    //路由 查看员工页面
    @RequestMapping(value = "/employee-permission/show-employee")
    public String showEmployee(){
        return "/page/employee/show_employee";
    }

    //路由 员工管理页面
    @RequestMapping(value = "/employee-permissionn/show-employee")
    public String employeeCURD(){
        return "/page/employee/show_employee";
    }

    //路由 实习员工管理页面
    @RequestMapping(value = "/employee-permission/internship-manage")
    public String internshipCURD(){
        return "/page/employee/internship_list";
    }

    //路由 正式员工管理页面
    @RequestMapping(value = "/employee-permission/regular-manage")
    public String regularCURD(){
        return "/page/employee/regular_list";
    }

    //路由 离职员工管理页面
    @RequestMapping(value = "/employee-permission/departure-manage")
    public String departureCURD(){
        return "/page/employee/departure_list";
    }

    //路由 简历管理页面
    @RequestMapping(value = "/employee-permission/resume-manage")
    public String resumeCURD(){
        return "/page/employee/resume";
    }
}

